<template>
 <div class="app">
   <div class="container">
     <div class="inner-container">
       <div
         class="park-sec park-sec1"
         :class="{active:isExpanded}">
         <div class="park-inside">
           <img src="../assets/1.png">
           <div class ="content-sec">
             <h2>
               <router-link to="/project1">天气预报</router-link>
             </h2>
             <span>project1</span>
           </div>
         </div>
       </div>
       <div
         class="park-sec park-sec2"
         :class="{active:isExpanded}">
         <div class="park-inside">
           <img src="../assets/1.png">
           <div class ="content-sec">
             <h2>
               <router-link to="/project2">记事本</router-link>
             </h2>

             <span>project2</span>
           </div>
         </div>
       </div>
       <div
         class="park-sec park-sec3"
         :class="{active:isExpanded}">
         <div class="park-inside">
           <img src="../assets/1.png">
           <div class ="content-sec">
             <h2><router-link to="/project3">照片集</router-link></h2>
             <span>project13</span>
           </div>
         </div>
       </div>
       <div class="btn-grp">
         <button
           class="btn"
           :class="{active:isExpanded}"
           @click = "toggleCards"
         >
           {{ buttonText }}
         </button>
       </div>
     </div>
   </div>
 </div>
</template>

<script>
export default {
  data(){
    return{
      isExpanded : false
    };
  },
  computed:{
    buttonText(){
      return this.isExpanded ? "收起":"展开";
    }
  },
  methods:{
    toggleCards(){
      this.isExpanded =!this.isExpanded
    }
  }
}
</script>


<style scoped>
@import url('https://chinese-fonts-cdn.deno.dev/packages/maple-mono-cn/dist/MapleMono-CN-Medium/result.css');
.app {
  margin: 0px;
  padding: 0;
  font-family: 'Maple Mono CN Medium';
  background: #685fece1;
}

.container {
  position: relative;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inner-container {
  position: relative;
  max-width: 400px;
  width: 100%;
  padding: 15px;
  border-radius: 25px;
  box-sizing: border-box;
}

.park-sec {
  position: relative;
  max-width: 100%;
  width: 100%;
  padding: 15px;
  border-radius: 25px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
  transition: all .3s cubic-bezier(.68, -0.55, .27, 0.027);
  background: rgba(255, 255, 255, 0.288);
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
  backdrop-filter: blur(30px);
  border: 1px solid rgba(202, 200, 200, 0.4);
}

.park-sec.active {
  transform: unset;
}

.park-sec1 {
  z-index: 2;
  transform: translateY(200%) scale(0.95);
}

.park-sec2 {
  z-index: 1;
  transform: translateY(100%) scale(0.9);
}

.park-sec3 {
  z-index: 0;
  transform: translateY(0px) scale(0.85);
}

.park-inside {
  position: relative;
  display: flex;
}

.park-inside img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}


.content-sec {
  position: relative;
  margin: 3px 0 0 10px;
}

.content-sec h2 {
  position: relative;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.content-sec span,
.park-sec span {
  position: relative;
  color: #f7efef;
  font-size: 14px;
}

.btn-grp {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  position: relative;
  padding: 10px 40px 10px 30px;
  background: #fffff3;
  border-radius: 20px;
  border: 0;
  box-sizing: border-box;
  backdrop-filter: blur(30px);
  box-shadow: 0px 1px 2px #9e9d9d;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #444444;
}

.btn::after {
  position: absolute;
  content: "";
  border-top: 2px solid #616160;
  border-left: 2px solid #5e5a5a;
  width: 7px;
  height: 7px;
  right: 23px;
  top: 12px;
  transform: rotate(225deg);
  transition: all .3s linear;
}

.btn.active::after {
  transform: rotate(45deg);
  top: 17px;
}
</style>
